Train a network to recognize handwritten digits and explore how different architectures learn
Draw a digit (0-9) below. The prediction updates automatically.
This demo trains a neural network on the MNIST dataset, which contains 60,000 training images and 10,000 test images of handwritten digits (0-9). Each image is 28x28 pixels in grayscale.
The network is a fully-connected feedforward network: the 784 input pixels are flattened into a vector, passed through two hidden layers with configurable size and activation function, then into a 10-neuron output layer with softmax activation that produces a probability distribution over the digits.
Try changing the architecture and retraining to see how it affects accuracy. Smaller networks learn faster but may underfit; larger networks may overfit. Dropout randomly disables neurons during training as a regularization technique.